declare namespace OPERATION_LOG {
  /**
   * 操作日志模型
   */
  interface OperationLogModel {
    id: number;
    userId: number;
    username: string;
    userRole: string; // 用户角色
    module: string; // 操作模块
    operation: string; // 操作类型
    description: string; // 操作描述
    method: string; // 请求方法
    requestUrl: string; // 请求URL
    requestIp: string; // 请求IP
    requestParams: string; // 请求参数
    status: boolean; // true-成功，false-失败
    errorMsg: string | null; // 错误消息
    operateTime: string; // 操作时间
    duration: number; // 执行时长（毫秒）
    createTime: string; // 创建时间
  }

  /**
   * 操作日志列表请求参数
   */
  interface OperationLogListParams {
    pageNum?: number;
    pageSize?: number;
    userId?: number;
    username?: string;
    userRole?: string;
    module?: string;
    operation?: string;
    description?: string;
    requestUrl?: string;
    requestIp?: string;
    status?: boolean;
    startTime?: string;
    endTime?: string;
  }

  /**
   * 操作日志列表响应数据
   */
  interface OperationLogListResponse {
    code: number;
    message: string;
    data: {
      pageNum: number;
      pageSize: number;
      total: number;
      pages: number;
      list: OperationLogModel[];
      hasPrevious: boolean;
      hasNext: boolean;
    };
  }

  /**
   * 操作统计数据
   */
  interface OperationStatsModel {
    totalOperations: number;
    uniqueUsers: number;
    averageOperationsPerUser: number;
    successRate: number;
  }

  /**
   * 操作统计数据响应
   */
  interface OperationStatsResponse {
    code: number;
    message: string;
    data: OperationStatsModel;
  }

  /**
   * 每日操作次数项
   */
  interface DailyOperationCountItem {
    date: string;
    count: number;
  }

  /**
   * 每日操作次数响应
   */
  interface DailyOperationCountResponse {
    code: number;
    message: string;
    data: DailyOperationCountItem[];
  }

  /**
   * 操作分布数据项
   */
  interface OperationDistributionItem {
    operation: string;
    count: number;
    percentage: number;
  }

  /**
   * 操作分布数据响应
   */
  interface OperationDistributionResponse {
    code: number;
    message: string;
    data: OperationDistributionItem[];
  }

  /**
   * 模块分布数据项
   */
  interface ModuleDistributionItem {
    module: string;
    count: number;
  }

  /**
   * 模块分布数据响应
   */
  interface ModuleDistributionResponse {
    code: number;
    message: string;
    data: ModuleDistributionItem[];
  }

  /**
   * 枚举项
   */
  interface EnumItem {
    value: string;
    label: string;
  }

  /**
   * 枚举响应数据
   */
  interface EnumResponse {
    code: number;
    message: string;
    data: EnumItem[];
  }
}